package com.apptude.android.trivial.draw2d;

public class BackgroundThread extends Thread {
	
	BackgroundThread() {
		super(threadName);
	}
	
	@Override
	public void run() {
		super.run();
		
		while (keepRunning) {
			try {
				sleep(1000);
			}
			catch (InterruptedException e) {
			}
		}
	}
	
	public void startRunning() {
		keepRunning = true;
		start();
	}
	
	public void stopRunning() {
		keepRunning = false;
	}
	
	private static final String threadName = "Draw2dBackground";
	
	private boolean keepRunning = true;

}
